
def add_call_back(fn,callback,args = None ,kwargs = None,callback_args = None,callback_kwargs = None):
    if not callback:
        raise Exception('callback not None')
    if not args:
        args = []
    if not kwargs:
        kwargs = {}
    res = fn(*args,**kwargs)
    if not callback_args:
        callback_args = []
    if not callback_kwargs:
        callback_kwargs = {}
    print(callback_kwargs,callback_args)
    if not res:
        callback(*callback_args,**callback_kwargs)
    else:
        callback(res,*callback_args, **callback_kwargs)
